Simple examples of selector combinators
Selects an element that is immediately after another:
.element + .element
Styles elements that immediately follow another element.
Selects all siblings that come after an element:
.element ~ .element
Styles all matching siblings that come after the first element.
Selects direct children of an element:
.parent > .child
Only styles direct children, not nested ones.
Combinators work with pseudo-classes:
.parent:hover > .child
Hover over the parent to see child elements change.